package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.sky.entity.Orders;
import com.sky.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    //批量插入订单明细数据
    void insertBatch(List<OrderDetail> orderDetailList);
    //根据id查询订单
    @Select("select * from order_detail where id =#{id}")
    List<OrderDetail> select(Long id);
    //查询订单详情
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getOrderDetailById(Long id);

}
